
#ifndef CONNECTION_H
#define CONNECTION_H

#include <QHostAddress>
#include <QTcpSocket>

class Connection : public QTcpSocket
{
    Q_OBJECT

public:
    Connection(QObject *parent = 0);

signals:
    void clientReg(const QString& name, const int sockid,const int id);
    void dataReady(const QByteArray& byte, const int id );

    void simCCCome(const QByteArray& byte, const int id, QTcpSocket* tcp );
    void simRVCome(const QByteArray& byte, const int id, QTcpSocket* tcp );
    void simFOStatCome(const QByteArray& byte, const int id, QTcpSocket* tcp);
    void simFOTrnCome(const QByteArray& byte, const int id, QTcpSocket* tcp );
    void simFVCome(const QByteArray& byte, const int id, QTcpSocket* tcp );


private slots:
    void processReadyRead();
    
private:
    //void procReg(const QByteArray data, bool& isRegMsg);
   
};

#endif
